#include "pthread.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"

// 线程基本模型

static void *my_thread(void *arg)
{
	int nr;

	for(nr = 0; nr < 3; ++nr) {
		printf("%s\n", "my_thread...");
	}
}

int main(int argc, char const *argv[])
{
	pthread_t ph;
	int ret;

	ret = pthread_create(&ph, NULL, my_thread, NULL);

	if(ret!=0) {
		printf("pthread create err\n");
		exit(1);
	}

	// for(unsigned i = 0; i < 3; ++i) {
	// 	pthread_join(ph, NULL);
	// }

	// pthread_join(ph, NULL);
	while(1) {
	    ;
	}
	return 0;
}

